-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hoist vector transfers outside reduction and k loop #977
base: main
Are you sure you want to change the base?
Conversation
…de the reduction/k loop
|
||
// Code to hoist vector transfer read before the reduction and k loop | ||
if (auto vectorReadOp = contractOp.getOperand(contractOp.getNumOperands()-1).getDefiningOp()) { | ||
auto subviewOp = vectorReadOp->getOperand(0).getDefiningOp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs some invariance check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope the updated code does the check. But, still want to confirm from you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a few negative test cases?
Pattern can be very specific but we shouldn't crash compiler on unexpected inputs.
Add three negative test-cases. Two in unit tests and one in integration test. |
Hoists the vector transfer read and write operations of resultant matrix outside the reduction and k loop for a brgemm operation. This pass should be applied after the BrgemmLinalgTiling pass.